import { Prism as SyntaxHighlighter } from "react-syntax-highlighter";
import Blog0 from "../../blogs/antv-x6.mdx";
import Blog1 from "../../blogs/threejs.mdx";
import Blog2 from "../../blogs/qiankun.mdx";

function code({ className, ...props }: any) {
  const match = /language-(\w+)/.exec(className || "");
  return match ? (
    <SyntaxHighlighter language={match[1]} PreTag="div" {...props} />
  ) : (
    <code className={className} {...props} />
  );
}

export const blog_list = [
  {
    title: "antv-x6 在接线图中的应用",
    tags: ["antv"],
    component: <Blog0 components={{ code }} />,
  },
  {
    title: "qiankun初探",
    tags: ["qiankun", "微前端"],
    component: <Blog1 components={{ code }} />,
  },
  {
    title: "threejs在智慧能源可能的实践",
    tags: ["threejs"],
    component: <Blog2 components={{ code }} />,
  },
];
